import React from 'react'
import {Route, IndexRoute} from 'react-router'

import AppComponent from '../components/app/app'
import HomeComponent from '../components/home/home'
import LoginComponent from '../components/login/loginComponent'
import CNodeComponent from '../components/cnode/cnode'
import WelcomeComponent from '../components/welcome/welcome'
import ReportQuestionComponent from '../components/rightPart/qa-manage/report-question'
import OpenQuestionComponent from '../components/rightPart/qa-manage/open-question'
import CloseQuestionComponent from '../components/rightPart/qa-manage/close-question'
import AddQuestionComponent from '../components/rightPart/qa-manage/add-question'
import ReportAnswerComponent from '../components/rightPart/qa-manage/report-answer'
import OpenAnswerComponent from '../components/rightPart/qa-manage/open-answer'
import CloseAnswerComponent from '../components/rightPart/qa-manage/close-answer'


const routes = (
    <Route path="/" component={AppComponent}>
        <IndexRoute component={LoginComponent} />
        <Route path="login" component={LoginComponent} />
        <Route path="home" component={HomeComponent}>
            <IndexRoute component={WelcomeComponent} />
            <Route path="cnode" component={CNodeComponent}/>
            <Route path="report-question" component={ReportQuestionComponent}/>
            <Route path="open-question" component={OpenQuestionComponent}/>
            <Route path="close-question" component={CloseQuestionComponent}/>
            <Route path="add-question" component={AddQuestionComponent}/>
            <Route path="report-answer" component={ReportAnswerComponent}/>
            <Route path="open-answer" component={OpenAnswerComponent}/>
            <Route path="close-answer" component={CloseAnswerComponent}/>
        </Route>
    </Route>
)

export default routes;
